<!DOCTYPE>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
    <title>用户添加</title>
    <link href="/css/style2.css" rel="stylesheet" type="text/css"/>
    <link href="/css/select.css" rel="stylesheet" type="text/css"/>
    <script src="/js/jquery.js" type="text/javascript"></script>
    <script src="/js/jquery.idTabs.min.js" type="text/javascript"></script>
    <script src="/js/select-ui.min.js" type="text/javascript"></script>
    <script src="/js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript">
        KE.show({
            id: 'content7',
            cssPath: './index.css'
        });
    </script>

    <script type="text/javascript">
        $(document).ready(function (e) {
            $(".select1").uedSelect({
                width: 345
            });
            $(".select2").uedSelect({
                width: 167
            });
            $(".select3").uedSelect({
                width: 100
            });
        });
    </script>
    <script language="javascript">
        function saveButton() {
            document.forms[0].action = "reportSave";
            let insertForm = $('#insertForm').serializeArray()
            console.log(insertForm);
            if (insertForm[2].value.indexOf('-') == -1) {
                alert('时间格式不正确！')
                return
            }
            for (let i = 0; i < insertForm.length; i++) {
                if (insertForm[i].value == '') {
                    alert('请输入必填项！')
                    return
                }
            }
            document.forms[0].submit();
        }
    </script>
</head>

<body>
<form method="post" id="insertForm">
    <input name="reportId" th:value="${report.reportId}" type="hidden">
    <div class="place">
        <span>位置：</span>
        <ul class="placeul">
            <li><a href="/report/reportSearch">日报管理</a></li>
            <li><a href="#">修改日报</a></li>
        </ul>
    </div>

    <div class="formbody">

        <div class="formtitle"><span>基本信息</span></div>

        <ul class="forminfo">
            <li>
                <label>姓名</label>
                </label><input class="dfinput" name="account" th:value="${report.account}" type="text"/>
            </li>
            <li>
                <label>日期 <font color="red">*</font></label>
                <input class="dfinput" name="reportDate" onClick="WdatePicker({work_date:'',dateFmt:'yyyy-MM-dd'})"
                       th:value="${report.reportDate}"
                       type="text"/>
            </li>
            <li>
                <label>作业进度 <font color="red">*</font></label><input class="dfinput"
                                                                     name="workProcess"
                                                                     th:value="${report.workProcess}" type="text"/>
            </li>
            <li>
                <label>作业内容<font color="red">*</font></label>
                </label>
                <textarea cols="10" id="tomorrow_plan2" maxlength="255" name="workContent" required="required"
                          rows="5"
                          style="width: 500px; height: 30px; padding-left:5px; border: 1px solid #eaeff2; margin-top: 20px;ime-mode:disabled;">
                    [[${report.workContent}]]
                </textarea>
            </li>

            <li>
                <label>明日计划 <font color="red">*</font></label>
                <textarea cols="10" id="tomorrow_plan" maxlength="255" name="tomorrowPlan" required="required"
                          rows="5"
                          style="width: 500px; height: 30px; padding-left:5px; border: 1px solid #eaeff2; margin-top: 20px;ime-mode:disabled;">
                    [[${report.tomorrowPlan}]]
                </textarea></li>
            <li>
                <label>问题点</label>
                <textarea cols="10" id="tomorrow_plan4" maxlength="255" name="problem" required="required"
                          rows="5"
                          style="width: 500px; height: 30px; padding-left:5px; border: 1px solid #eaeff2; margin-top: 20px;ime-mode:disabled;">
                    [[${report.problem}]]
                </textarea>
            </li>
            <li>
                <label>需联络事项</label>
                <textarea cols="10" id="tomorrow_plan3" maxlength="255" name="other" required="required"
                          rows="5"

                          style="width: 500px; height: 30px; padding-left:5px; border: 1px solid #eaeff2; margin-top: 20px;ime-mode:disabled;">
                    [[${report.other}]]
                </textarea>
            </li>
            <li><label>&nbsp;</label><input class="btn" name="" onclick="saveButton()" type="button" value="确认保存"/></li>
        </ul>
    </div>
</form>
</body>
</html>
